#include "mainwindow.h"
#include <QQuickView>
#include <QGuiApplication>
#include <qqml.h>
#include "imagepro.h"
#include "scale.h"
#include "camera.h"
#include"imageprovie.h"
int main(int argc, char *argv[])
{
    qDebug()<<"Open";
    QGuiApplication app(argc, argv);
    qmlRegisterType<Camera>("CustomComponents",1,0,"CameraB");
    QQuickView viewer;
    qDebug()<<"Open";
    // Scale s;
    // Qimage to qml
    viewer.engine()->addImageProvider(QLatin1String("a"),new imageProvie());
    viewer.setSource(QUrl("qrc:///main.qml"));
    viewer.show();
    //Quit
    QObject::connect((QObject*)viewer.engine(),SIGNAL(quit()),&app,SLOT(quit()));
    return app.exec();
}
